<%@ page language="java" import="java.util.*,com.sms.day_report.*" pageEncoding="ISO-8859-1"%>

<%@ page import="com.sms.user.*,net.sf.json.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<%	//清除内存
	response.setHeader("Pragma","No-cache"); 
	response.setHeader("Cache-Control","no-cache"); 
	response.setDateHeader("Expires", 0); 
%> 
<%
  request.setCharacterEncoding("UTF-8");
  String fromid=(String)session.getAttribute("userno");
	System.out.println(fromid);
  String toid=request.getParameter("toid");
 // String role=request.getParameter("role");
  System.out.println(toid);
  String content=request.getParameter("content");
  System.out.println(content);
  String limit=request.getParameter("lim");
  System.out.println(limit);
  String msg = "";
  if(Day_report.inadddata(limit, fromid, toid, content)){
  
   msg="ok";
		}else {msg="error";}  
 		
	JSONArray json = new JSONArray();
	JSONObject j = new JSONObject();
	j.put("text", msg);	
	json.add(j);
	
	out.clear();
	out.println(json);
 %>
